﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace OntologyFormDesigner.Widget
{
    [OntologyFormDesigner.Annotation.Widget("RadioButtonGroupBox")]
    public partial class RadioButtonGroupBox : WidgetPanel, OntologyUtility.Interfaces.IOrWidget, OntologyUtility.Interfaces.IWidgetWithItems
    {
        public RadioButtonGroupBox()
        {
            InitializeComponent();
        }

        OntologyUtility.Node ontologyNode;

        public OntologyUtility.Node Node
        {
            get
            {
                return ontologyNode;
            }
            set
            {
                ontologyNode = value;
            }
        }

        OntologyUtility.Xml.OntologiesNodes ontologiesNodes = null;
        public OntologyUtility.Xml.OntologiesNodes OntologiesNodes
        {
            get
            {
                return ontologiesNodes;
            }
            set
            {
                this.ontologiesNodes = value;
            }
        }

        public override String Text
        {
            get
            {
                return group.Text;
            }
            set
            {
                group.Text = value;
            }
        }

        public void update()
        {
            update(this.ontologiesNodes.Nodes);
        }
    }
}
